/**
 * 异步处理接口
 */

import * as type from './type'
import ProductApi from 'Api/product'

const actions = {
    // 获取商品详情信息
    async getProductInfo({ commit }, value) {
        let result = await ProductApi.GetProductById(value)

        let action = {
            type: type.MODIFY_PRODUCT_INFO,
            payload: result.Data
        }

        commit(action)
    }
}

export default actions